function setRem() {
  const w_design = 3.75;
  const w_scrn = window.innerWidth;

  const h_design = 6.67;
  const h_scrn = window.innerHeight;

  let rem = w_scrn/w_design > h_scrn/h_design ? h_scrn/h_design : w_scrn/w_design
  document.documentElement.style.fontSize = `${rem}px`;
}
setRem();
window.onresize = () => {
  setRem();
};